﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;
using System.Xml.Serialization;

namespace SharingCenter.Web.Classes.Requests
{
    using ClassLibrary;
    using System.IO;
    using System.Xml;

    [Serializable]
    public class RequestContext
    {
        public XElement Serialize()
        {
            XmlSerializer ser = new XmlSerializer(this.GetType());
            MemoryStream stream = new MemoryStream();
            XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
            ns.Add("", "");
            ser.Serialize(stream, this, ns);
            return XElement.Parse(StringHelper.ConvertFromMemoryStream(stream));
        }

        
    }
}
